.class public Lcom/xiaomi/notes/Tools;
.super Ljava/lang/Object;
.source "Tools.java"


# static fields
.field public static final N_ALERT_DIALOG_LNG:I = 0x3c

.field public static final N_BACKUP_TXT:I = 0x1

.field public static final N_BACKUP_XML:I = 0x0

.field public static final N_CONFIG_DB_VERSION:I = 0x5

.field public static final N_CONFIG_FONT_SIZE:I = 0x1

.field public static final N_CONFIG_NOTE_COLOR:I = 0x4

.field public static final N_CONFIG_NUMS:I = 0x6

.field public static final N_CONFIG_PASSWORD:I = 0x2

.field public static final N_CONFIG_TRY_STOP_TIME:I = 0x3

.field public static final N_CONFIG_USE_TIME:I = 0x0

.field public static final N_CURRENT_DB_VERSION:I = 0x3

.field public static final N_DB_TO_DIST_EMAIL:I = 0x1

.field public static final N_DB_TO_DIST_SD:I = 0x0

.field public static final N_DESKTOP_TITLE_LNG:I = 0xa

.field public static final N_INIT_APP_FONT_SIZE_MAX:I = 0x28

.field public static final N_INIT_APP_FONT_SIZE_MIN:I = 0xa

.field public static final N_NOTE_MODE_CHECKLIST:I = 0x1

.field public static final N_NOTE_MODE_NORMAL:I = 0x0

.field public static final N_NOTE_SPLIT_NUMS:I = 0x1e

.field public static final N_PASSWORD_TRYS_NUMS:I = 0x3

.field public static final N_TITLE_LNG:I = 0x1e

.field public static final N_WIDGET_ID_FACTOR:I = 0xa

.field public static final N_WIDGET_SIZE_2X2:I = 0x0

.field public static final N_WIDGET_SIZE_4X4:I = 0x1

.field public static final N_WIDGET_TEXT_COLOR:[I = null

.field public static final STR_ACTIVITY_ID:Ljava/lang/String; = "XM_NOTE_ID"

.field public static final STR_ACTIVITY_INFO:Ljava/lang/String; = "XM_NOTE_TITLE"

.field public static final STR_CHECK_DEFINE:Ljava/lang/String; = "100100000001000001000000"

.field public static final STR_CONFIG_DB_VERSION:Ljava/lang/String; = "n_dbserver"

.field public static final STR_CONFIG_FONT_SIZE:Ljava/lang/String; = "n_fontsize"

.field public static final STR_CONFIG_NOTE_COLOR:Ljava/lang/String; = "n_notecolor"

.field public static final STR_CONFIG_PASSWORD:Ljava/lang/String; = "s_password"

.field public static final STR_CONFIG_TRY_STOP_TIME:Ljava/lang/String; = "l_stoptime"

.field public static final STR_CONFIG_USE_TIME:Ljava/lang/String; = "l_usetime"

.field public static final STR_SD_DIC_URL:Ljava/lang/String; = null

.field public static final STR_SD_DIC_URL_INFO:Ljava/lang/String; = "xm_notes"

.field public static final STR_SD_FILE_TEXT_URL:Ljava/lang/String; = "notes_%s.txt"

.field public static final STR_SD_FILE_XML_URL:Ljava/lang/String; = "notes.xml"

.field public static final STR_SPLIT_FLAG:Ljava/lang/String; = "|"


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 41
    const/4 v0, 0x5

    new-array v0, v0, [I

    fill-array-data v0, :array_0

    sput-object v0, Lcom/xiaomi/notes/Tools;->N_WIDGET_TEXT_COLOR:[I

    .line 63
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "/xm_notes/"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/xiaomi/notes/Tools;->STR_SD_DIC_URL:Ljava/lang/String;

    return-void

    .line 41
    :array_0
    .array-data 0x4
        0x0t 0x33t 0x66t 0xfft
        0x33t 0x33t 0x66t 0xfft
        0x33t 0x0t 0x0t 0xfft
        0x0t 0x33t 0x33t 0xfft
        0x33t 0x33t 0x33t 0xfft
    .end array-data
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 17
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static deleteLinkWidget(Landroid/content/Context;II)V
    .locals 4
    .parameter "context"
    .parameter "nWidgetId"
    .parameter "nWidgetSize"

    .prologue
    .line 144
    if-lez p1, :cond_0

    .line 145
    const/4 v0, 0x0

    .line 146
    .local v0, i:Landroid/content/Intent;
    packed-switch p2, :pswitch_data_0

    .line 154
    :goto_0
    if-eqz v0, :cond_0

    .line 155
    const-string v1, "android.appwidget.action.APPWIDGET_UPDATE"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 156
    const-string v1, "appWidgetIds"

    const/4 v2, 0x1

    new-array v2, v2, [I

    const/4 v3, 0x0

    aput p1, v2, v3

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[I)Landroid/content/Intent;

    .line 159
    invoke-virtual {p0, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    .line 162
    .end local v0           #i:Landroid/content/Intent;
    :cond_0
    return-void

    .line 148
    .restart local v0       #i:Landroid/content/Intent;
    :pswitch_0
    new-instance v0, Landroid/content/Intent;

    .end local v0           #i:Landroid/content/Intent;
    const-class v1, Lcom/xiaomi/notes/Widget;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 149
    .restart local v0       #i:Landroid/content/Intent;
    goto :goto_0

    .line 151
    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    .end local v0           #i:Landroid/content/Intent;
    const-class v1, Lcom/xiaomi/notes/Widget_44;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .restart local v0       #i:Landroid/content/Intent;
    goto :goto_0

    .line 146
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public static getBaseTime(Landroid/content/Context;JIII)Ljava/lang/String;
    .locals 9
    .parameter "context"
    .parameter "time"
    .parameter "nCurrYear"
    .parameter "nCurrMonth"
    .parameter "nCurrDay"

    .prologue
    .line 187
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 188
    .local v0, cal:Ljava/util/Calendar;
    invoke-virtual {v0, p1, p2}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 189
    const/4 v5, 0x1

    invoke-virtual {v0, v5}, Ljava/util/Calendar;->get(I)I

    move-result v4

    .line 190
    .local v4, y:I
    const/4 v5, 0x2

    invoke-virtual {v0, v5}, Ljava/util/Calendar;->get(I)I

    move-result v5

    add-int/lit8 v3, v5, 0x1

    .line 191
    .local v3, m:I
    const/4 v5, 0x5

    invoke-virtual {v0, v5}, Ljava/util/Calendar;->get(I)I

    move-result v1

    .line 193
    .local v1, d:I
    if-ne p3, v4, :cond_0

    if-ne p4, v3, :cond_0

    if-ne p5, v1, :cond_0

    .line 194
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f050060

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 200
    .local v2, format:Ljava/lang/String;
    :goto_0
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v5

    invoke-static {v2, v5, v6}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v5

    return-object v5

    .line 195
    .end local v2           #format:Ljava/lang/String;
    :cond_0
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v7

    sub-long/2addr v5, v7

    const-wide/32 v7, 0x240c8400

    cmp-long v5, v5, v7

    if-gez v5, :cond_1

    .line 196
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f050061

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .restart local v2       #format:Ljava/lang/String;
    goto :goto_0

    .line 198
    .end local v2           #format:Ljava/lang/String;
    :cond_1
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f05005e

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v2

    .restart local v2       #format:Ljava/lang/String;
    goto :goto_0
.end method

.method public static getConfigData(Landroid/app/Activity;)[Ljava/lang/Object;
    .locals 9
    .parameter "context"

    .prologue
    const-wide/16 v7, 0x0

    const/4 v6, 0x3

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 113
    invoke-virtual {p0, v4}, Landroid/app/Activity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 115
    .local v0, objConfig:Landroid/content/SharedPreferences;
    const/4 v2, 0x6

    new-array v1, v2, [Ljava/lang/Object;

    .line 116
    .local v1, ret:[Ljava/lang/Object;
    const-string v2, "l_usetime"

    invoke-interface {v0, v2, v7, v8}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    aput-object v2, v1, v4

    .line 117
    const-string v2, "n_fontsize"

    const/16 v3, 0xf

    invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v1, v5

    .line 119
    const/4 v2, 0x2

    const-string v3, "s_password"

    const/4 v4, 0x0

    invoke-interface {v0, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v1, v2

    .line 120
    const-string v2, "l_stoptime"

    invoke-interface {v0, v2, v7, v8}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    aput-object v2, v1, v6

    .line 121
    const/4 v2, 0x4

    const-string v3, "n_notecolor"

    invoke-interface {v0, v3, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    .line 122
    const/4 v2, 0x5

    const-string v3, "n_dbserver"

    invoke-interface {v0, v3, v6}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    .line 124
    return-object v1
.end method

.method public static getDateYMD(Landroid/content/Context;J)Ljava/lang/String;
    .locals 4
    .parameter "context"
    .parameter "time"

    .prologue
    .line 219
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 220
    .local v0, cal:Ljava/util/Calendar;
    invoke-virtual {v0, p1, p2}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 221
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f05005d

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 222
    .local v1, format:Ljava/lang/String;
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v2

    invoke-static {v1, v2, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method public static getDateYMDW(Landroid/content/Context;IIII)Ljava/lang/String;
    .locals 4
    .parameter "context"
    .parameter "nCurrYear"
    .parameter "nCurrMonth"
    .parameter "nCurrDay"
    .parameter "nCurrWeek"

    .prologue
    .line 205
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 206
    .local v0, cal:Ljava/util/Calendar;
    invoke-virtual {v0, p1, p2, p3}, Ljava/util/Calendar;->set(III)V

    .line 207
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f05005c

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 208
    .local v1, format:Ljava/lang/String;
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v2

    invoke-static {v1, v2, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method public static getFuzzyTime(Landroid/content/Context;J)Ljava/lang/String;
    .locals 11
    .parameter "context"
    .parameter "time"

    .prologue
    const-wide/16 v9, 0x3e8

    const/4 v8, 0x2

    const/4 v7, 0x1

    .line 226
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f060001

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object v2

    .line 228
    .local v2, tip:[Ljava/lang/String;
    add-long v3, p1, v9

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    sub-long/2addr v3, v5

    div-long/2addr v3, v9

    const-wide/16 v5, 0x3c

    div-long/2addr v3, v5

    long-to-int v0, v3

    .line 229
    .local v0, num:I
    if-gez v0, :cond_0

    .line 230
    array-length v3, v2

    sub-int/2addr v3, v8

    aget-object v1, v2, v3

    .line 240
    .local v1, ret:Ljava/lang/String;
    :goto_0
    return-object v1

    .line 231
    .end local v1           #ret:Ljava/lang/String;
    :cond_0
    if-nez v0, :cond_1

    .line 232
    array-length v3, v2

    sub-int/2addr v3, v7

    aget-object v1, v2, v3

    .restart local v1       #ret:Ljava/lang/String;
    goto :goto_0

    .line 233
    .end local v1           #ret:Ljava/lang/String;
    :cond_1
    const/16 v3, 0x3c

    if-ge v0, v3, :cond_2

    .line 234
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    const/4 v4, 0x0

    aget-object v4, v2, v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .restart local v1       #ret:Ljava/lang/String;
    goto :goto_0

    .line 235
    .end local v1           #ret:Ljava/lang/String;
    :cond_2
    const/16 v3, 0x5a0

    if-ge v0, v3, :cond_3

    .line 236
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    div-int/lit8 v4, v0, 0x3c

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    aget-object v4, v2, v7

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .restart local v1       #ret:Ljava/lang/String;
    goto :goto_0

    .line 238
    .end local v1           #ret:Ljava/lang/String;
    :cond_3
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    div-int/lit16 v4, v0, 0x5a0

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    aget-object v4, v2, v8

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .restart local v1       #ret:Ljava/lang/String;
    goto :goto_0
.end method

.method public static getTimeMDHM(Landroid/content/Context;J)Ljava/lang/String;
    .locals 4
    .parameter "context"
    .parameter "time"

    .prologue
    .line 212
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 213
    .local v0, cal:Ljava/util/Calendar;
    invoke-virtual {v0, p1, p2}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 214
    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f05005f

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 215
    .local v1, format:Ljava/lang/String;
    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v2

    invoke-static {v1, v2, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;J)Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method public static getTitleString(Ljava/lang/CharSequence;I)Ljava/lang/CharSequence;
    .locals 7
    .parameter "s"
    .parameter "lng"

    .prologue
    const/16 v6, 0xa

    .line 247
    const/4 v3, 0x0

    .line 248
    .local v3, start:I
    const/4 v0, 0x0

    .line 249
    .local v0, end:I
    const/4 v2, 0x0

    .line 251
    .local v2, index:I
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    invoke-interface {p0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-ge v1, v4, :cond_0

    .line 252
    invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    if-eq v4, v6, :cond_3

    invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    const/16 v5, 0x20

    if-eq v4, v5, :cond_3

    .line 257
    :cond_0
    move v2, v3

    .line 258
    add-int v0, v3, p1

    .line 259
    invoke-interface {p0}, Ljava/lang/CharSequence;->length()I

    move-result v4

    if-le v0, v4, :cond_1

    .line 260
    invoke-interface {p0}, Ljava/lang/CharSequence;->length()I

    move-result v0

    .line 263
    :cond_1
    move v1, v3

    :goto_1
    if-ge v1, v0, :cond_2

    .line 264
    invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C

    move-result v4

    if-ne v4, v6, :cond_4

    .line 270
    :cond_2
    invoke-interface {p0, v3, v2}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;

    move-result-object v4

    return-object v4

    .line 255
    :cond_3
    add-int/lit8 v3, v3, 0x1

    .line 251
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 267
    :cond_4
    add-int/lit8 v2, v2, 0x1

    .line 263
    add-int/lit8 v1, v1, 0x1

    goto :goto_1
.end method

.method public static setAlertTime(Landroid/content/Context;ILjava/lang/String;J)V
    .locals 10
    .parameter "context"
    .parameter "id"
    .parameter "body"
    .parameter "start"

    .prologue
    const/16 v5, 0x3c

    const/4 v7, 0x0

    const-string v9, "XM_NOTE_TITLE"

    const-string v8, "XM_NOTE_ID"

    .line 165
    new-instance v2, Landroid/content/Intent;

    const-class v4, Lcom/xiaomi/notes/PlayAlertSound;

    invoke-direct {v2, p0, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 166
    .local v2, intent:Landroid/content/Intent;
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 168
    .local v1, bundleInfo:Landroid/os/Bundle;
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v4

    if-le v4, v5, :cond_0

    .line 169
    const-string v4, "XM_NOTE_TITLE"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p2, v7, v5}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    const v6, 0x7f050016

    invoke-virtual {v5, v6}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v9, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 171
    const-string v4, "XM_NOTE_ID"

    invoke-virtual {v1, v8, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 176
    :goto_0
    invoke-virtual {v2, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    .line 178
    const/high16 v4, 0x800

    invoke-static {p0, v7, v2, v4}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v3

    .line 180
    .local v3, sender:Landroid/app/PendingIntent;
    const-string v4, "alarm"

    invoke-virtual {p0, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/AlarmManager;

    .line 181
    .local v0, alermManager:Landroid/app/AlarmManager;
    invoke-virtual {v0, v7, p3, p4, v3}, Landroid/app/AlarmManager;->set(IJLandroid/app/PendingIntent;)V

    .line 182
    return-void

    .line 173
    .end local v0           #alermManager:Landroid/app/AlarmManager;
    .end local v3           #sender:Landroid/app/PendingIntent;
    :cond_0
    const-string v4, "XM_NOTE_TITLE"

    invoke-virtual {v1, v9, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 174
    const-string v4, "XM_NOTE_ID"

    invoke-virtual {v1, v8, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    goto :goto_0
.end method

.method public static setConfigData(Landroid/app/Activity;[Ljava/lang/Object;)V
    .locals 5
    .parameter "context"
    .parameter "config"

    .prologue
    const/4 v3, 0x0

    .line 130
    invoke-virtual {p0, v3}, Landroid/app/Activity;->getPreferences(I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 131
    .local v0, objConfig:Landroid/content/SharedPreferences;
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    .line 133
    .local v1, objConfigEdit:Landroid/content/SharedPreferences$Editor;
    const-string v2, "l_usetime"

    aget-object p0, p1, v3

    .end local p0
    check-cast p0, Ljava/lang/Long;

    invoke-virtual {p0}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    invoke-interface {v1, v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    .line 134
    const-string v2, "n_fontsize"

    const/4 v3, 0x1

    aget-object p0, p1, v3

    check-cast p0, Ljava/lang/Integer;

    invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I

    move-result v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 135
    const-string v2, "s_password"

    const/4 v3, 0x2

    aget-object p0, p1, v3

    check-cast p0, Ljava/lang/String;

    invoke-interface {v1, v2, p0}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 136
    const-string v2, "l_stoptime"

    const/4 v3, 0x3

    aget-object p0, p1, v3

    check-cast p0, Ljava/lang/Long;

    invoke-virtual {p0}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    invoke-interface {v1, v2, v3, v4}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;

    .line 137
    const-string v2, "n_notecolor"

    const/4 v3, 0x4

    aget-object p0, p1, v3

    check-cast p0, Ljava/lang/Integer;

    invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I

    move-result v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 138
    const-string v2, "n_dbserver"

    const/4 v3, 0x5

    aget-object p0, p1, v3

    check-cast p0, Ljava/lang/Integer;

    invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I

    move-result v3

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 140
    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 141
    return-void
.end method
